package com.sky.controller.admin;

import com.sky.mapper.OrderMapper;
import com.sky.result.Result;
import com.sky.service.OrderService;
import com.sky.service.WorkspaceService;
import com.sky.vo.BusinessDataVO;
import com.sky.vo.DishOverViewVO;
import com.sky.vo.OrderOverViewVO;
import com.sky.vo.SetmealOverViewVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/workspace")
@Api(tags = "工作台接口")
public class WorkspaceController {

    @Autowired
    private WorkspaceService workspaceService;


    @GetMapping("/businessData")
    @ApiOperation("查询今日运营数据")
    private Result<BusinessDataVO> businessData(){
        BusinessDataVO result=workspaceService.businessData();
        return Result.success(result);
    }

    @GetMapping("/overviewSetmeals")
    @ApiOperation("查询套餐总览")
    public Result<SetmealOverViewVO> overviewSetmeals(){
        SetmealOverViewVO result=workspaceService.overviewSetmeals();
        return Result.success(result);
    }
    @GetMapping("/overviewDishes")
    @ApiOperation("查询套餐总览")
    public Result<DishOverViewVO> overviewDishes(){
        DishOverViewVO result=workspaceService.overviewDishes();
        return Result.success(result);
    }
    @GetMapping("/overviewOrders")
    @ApiOperation("查询套餐总览")
    public Result<OrderOverViewVO> overviewOrders(){
        OrderOverViewVO result=workspaceService.overviewOrders();
        return Result.success(result);
    }


}
